﻿using NaireSystem.DBEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using TYBase;
using TYControls;

namespace NaireSystem.Views.UserManager
{
    /// <summary>
    /// ViewEditDictType.xaml 的交互逻辑
    /// </summary>
    public partial class ViewEditDictData : TYWindow
    {
        public ViewEditDictData(Tbl_DictData dictType)
        {
            InitializeComponent();
            this.Loaded += ViewEditDictType_Loaded;
            DictData = dictType;
            if (DictData != null)
            {
                txtDictTypeName.Text = DictData.dict_label.ToString();
            }
        }

        public string StrDictLabel { get; private set; }
        private Tbl_DictData DictData { get; }

        private void ViewEditDictType_Loaded(object sender, RoutedEventArgs e)
        {


        }

        private void BtnClick_OK(object sender, RoutedEventArgs e)
        {
            txtDictTypeName.Text = txtDictTypeName.Text.Trim();
            if (txtDictTypeName.Text.Null())
            {
                this.ShowMsg("请输入内容");
                return;
            }
            StrDictLabel = txtDictTypeName.Text;
            this.DialogResult = true;
        }
    }
}
